#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Copyright (c) 2025 粤港澳大湾区（广东）国创中心

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

File: pyncti_mesh_add_output.py
Desc: Function to add output requests to the mesh.
Author: xumanjia
Date: 2025-08-01
"""
#输出
def pyncti_mesh_add_output(NCTI,doc):
    doc.ResetCaseResult()
    field_output = 1
    node_vars = ["U", "UR", "UT", "V", "VR", "VT"]
    element_vars =  ["E", "S"]
    output_options = {}
    node_options = {}
    element_options = {"directions": "YES"}
    #param2:输出的名称
    #param3:输出类型，0-历史变量输出，1-场变量输出
    #param4:节点变量输出数组
    #param5:单元变量输出数组
    #param6:输出设置，可选
    #param7:节点输出设置，可选
    #param8:单元输出设置，可选
    doc.RunCommand("cmd_ncti_mesh_add_output", "field", field_output, node_vars, element_vars, output_options, node_options, element_options)
